import request from '@/utils/request'

export function getMapData(floor) {
  return request({
    url: "/floor_data",
    method: "get",
    params:{floor}
  });
}

export function record_route(startId, endId) {
  return request({
    url: "/record_route",
    method: "post",
    data: {
      start_id: startId,
      end_id: endId
    }
  });
}

export function search_point(data) {
  return request({
    url: "/search_points",
    method: "post",
    data: {
        keyword: data
    }
  });
}

export function get_floor(data) {
  return request({
    url: "/get_floor",
    method: "get",
    params: {  // 关键修改：data → params
      point_id: data
    }
  });
}
export function get_hot_points() {
  return request({
    url: "/hot_points",
    method: "get",
  });
}
export function get_department() {
  return request({
    url: "/department_data",
    method: "get",
  });
}
